Nowadays, a redundant arrays of inexpensive disks (RAID) system has been known as a system in which a plurality of hard disk drives (HDDs) are combined for data to have redundancy, and which aims to improve performance as well as reliability, RAID-5 systems have been widely used among such RAID systems because of the good balance of the reliability and the performance. (For example, refer to the Japanese Patent Publication No. 8-76941 “Patent Document 1”).
The RAID-5 system stripes a RAID group consisting of a plurality of HDDs, exclusively ORs (XORs) data on drives of the RAID group by stripe, and records the result as a parity onto a drive of the RAID group. If any logical block address (LBA) of a drive of the RAID group cannot be read out due to an occurring error, the data can be regenerated by XORing the data and the parities in the remaining drives. If the drive goes down, it does not result in data lost but the RAID can recover by writing (rebuilding) the XORed result into a spare stand-by disk.
It has been an advantageous feature that the RAID-5 system can be configured by small computer system interface (SCSI) or fibre channel arbitrated loop (FC-AL) disk devices for OEM instead of special disk devices with high reliability and at high prices because the RAID-5 can recover even if any drive goes down as described above. However, in recent years, entry servers with lower-priced serial ATA (SATA) HDDs have been widely used and error rates in such lower-priced HDDs are one digit higher than in disk devices for enterprises. Therefore, if any disk goes down, and moreover, an unrecoverable read error sector arises on one of the remaining disk drives during the recovery process, the system becomes unrecoverable to go down. To deal with such a problem, a RAID-6 in which the parities are doubled has been adopted in recent years.
The RAID-6 has two parity types, one is P+Q method illustrated in FIG. 8 (refer to Japanese Patent Publication No. 10-241128 “Patent Document 2”, for example) and the other is 2D-XOR method illustrated in FIG. 9. As shown in FIG. 8, in the P+Q method, in addition to XORed P-parities used in the RAID-5, Q-parities to which Galois fields of Reed-Solomon codes are added are generated.
For example, one of the P-parities, P-0, is calculated from:P-0=(0,A) xor (0,B) xor (0,C) xor (0,D),and one of the Q-parities, Q-0, is calculated from:Q-0=a(0)*(0,A) xor a(1)*(0,B)xor a(2)*(0,C) xor a(3)*(0,D).
An error can be corrected by using the P-parities. When two errors occur, they are corrected by solving simultaneous linear equations with two parameters P and Q.
On the contrary, as shown in FIG. 9, in the 2D-XOR method, diagonal XOR parities are generated in addition to conventional horizontal XOR parities of the RAID-5. Specifically, respective values of the horizontal parities Ph's in FIG. 9 are as follows:Ph-0=(0,B) xor (0,C) xor (0,D) xor (0,E)Ph-1=(1,A) xor (1,C) xor (1,D) xor (1,E)Ph-2=(2,0) xor (2,1) xor (2,3) xor (2,4)Ph-3=(3,A) xor (3,B) xor (3,C) xor (3,D)Ph-4=(4,A) xor (4,B) xor (4,C) xor (4,D).
Respective values of the diagonal parities Pd's are as follows:Pd-0=(1,A) xor (2,B) xor (3,C) xor (4,D) xor (0,E)Pd-1=(2,A) xor (3,B) xor (4,C) xor (0,D) xor (1,E)Pd-2=(3,A) xor (4,B) xor (0,C) xor (1,D) xor (2,E)Pd-3=(3,A) xor (4,B) xor (0,C) xor (1,D) xor (2,E)Pd-4=Ph-0 xor Ph-1 xor Ph-2 xor Ph-3 xor Ph-4.
In the P+Q method, calculation of the Q-parities is complicated. Therefore, for example, if a parity error is erroneously detected due to a bug, etc. or a parity error is detected due to a memory trouble occurs, it is impossible for an engineer to calculate to locate the error position. On the other hand, the 2D-XOR method is simpler in circuit construction so that an engineer can check the conformance of the data by XOR. However, because the two kinds of parities are located on separate drives, the number of times of accessing the drives for updating the parities in data-writing increases from four in the RAID-5 or the P+Q method to six in the 2D-XOR method.
Specifically, the new parity at writing in the RAID-5 can be calculated by XORing the old data, the new data, and the old parity, respectively. When a host controller carries Out these operations, four times of accesses, which are reading the old data from a writing target drive, writing the new data, reading the old parity from a parity disk drive, and writing the new parity, occur.
In the RAID-6, two accesses of reading the old parity from a diagonal parity disk drive and writing a new parity are added to result in six times of accesses in total. A specific example is described while referring to FIGS. 10 and 11. As shown in FIG. 10, the RAID-6 system includes a host controller 2, an HDD-A 1a, an HDD-B 1b, an HDD-C 1c, an HDD-D 1d, an HDD-E 1e, and an HDD-F 1f to configure a disk array, and a, fiber channel arbitrated loop network (FC-AL network) 3 which connects them.
FIG. 10 shows a case that the HDD-B 1b carries out writing at block (0,B) of the RAID group 0 by the 2D-XOR method. FIG. 11 is a sequence diagram illustrating processes by the host controller 2, the HDD-A 1a, the HDD-B 1b, and the HDD-F 1f which participate in the processes in FIG. 10.
First, the host controller 2 transmits a command to the HDD-B 1b to read the old data of the block (0,B) to be written to (S201). Besides, it transmits a command to the HDD-A 1a to read the horizontal parity (Ph-0) to be updated (S202). The HDD-B 1b reads the old data according to the read command at S201 (S203), and transmits the old data to the host controller 2 (S204). The HDD-A 1a reads the old horizontal parity according to the read command at S202 (S205) and transmits the old horizontal parity to the controller 2 (S206).
The host controller 2 generates a new horizontal parity from the new data, the old data, and the old horizontal parity (S207). Then, it transmits the new data and a write command thereof to the HDD-B 1b (S208), and transmits the new horizontal parity and a write command thereof to the HDD-A 1a (S209). The HDD-B 1b and the HDD-A 1a write the new data and the new horizontal parity respectively according to the above commands (S210, S211).
Furthermore, the host controller 2 transmits a command to the HDD-F 1f to read the diagonal parity (Pd-3) to be updated (S212). The HDD-F 1f reads the old diagonal parity according to the read command at S212 (S213), and transmits the old diagonal parity to the host controller 2 (S214). The host controller 2 generates a new parity from the new data, the old data, and the old diagonal parity (S215). Then, it transmits a command to write the new diagonal parity to the HDD-F 1f (S216). The HDD-F 1f writes the new diagonal parity according to the above commend (S217).
As described above, as the parities increase, overheads by accessing each drive for updating the parities increase. Therefore, to shorten the process time and to improve the performance, it is desirable to reduce the number of accesses for updating the parities accompanied by data-writing. For example, the Patent Document 1 suggests one of the techniques with respect to the RAID-5. In the Patent Document 1, a drive for writing the new data generates data for updating the parity (referred to as a pseudo-parity hereinbelow) by XORing the new data and the old data. A parity disk drive receives the pseudo-parity and generates a new parity by XORing the pseudo-parity and the old parity. This results in reducing the number of times of accessing the drives for updating the parity.
However, the technique disclosed in the Patent Document 1 is intended for the array system using one kind of parity like the RAID-5, but the system using two kinds of parities like the RAID-6 is not considered enough therein. In the Patent Document 1, the drive for writing the new data generates the command and the pseudo-parity, and transmits the command and the pseudo-parity to the parity disk drive which the drive itself or the host controller identifies in the write command. However, to improve the reliability of the system, it is preferable that the processes by the respective drives are simplified. Or, it is preferable that the host controller can instruct the drive for writing the new data without adding new data to the normal write command in order to maintain versatility.